
/*
 * Copyright 2002-2022 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 *版权所有2002-2022原作者。
 *
 *根据Apache许可证2.0版（“许可证”）获得许可；
 *除非符合许可证，否则不得使用此文件。
 *您可以在以下地址获取许可证副本：
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 *除非适用法律要求或书面同意，软件
 *根据许可证分发的内容是按“原样”分发的，
 *无任何明示或暗示的保证或条件。
 *有关管理权限和
 *许可证下的限制。
 */

package org.springframework.aop.framework;

import org.springframework.lang.Nullable;

/**
 * Delegate interface for a configured AOP proxy, allowing for the creation
 * of actual proxy objects.
 *
 * <p>Out-of-the-box implementations are available for JDK dynamic proxies
 * and for CGLIB proxies, as applied by {@link DefaultAopProxyFactory}.
 *
 * @author Rod Johnson
 * @author Juergen Hoeller
 * @see DefaultAopProxyFactory
 */
/**
 *已配置AOP代理的委托接口，允许创建
 *实际代理对象。
 *
 *＜p＞开箱即用的实现可用于JDK动态代理
 *以及由｛@link DefaultAopProxyFactory｝应用的CGLIB代理。
 *
 *@作者Rod Johnson
 *@作者Juergen Hoeller
 *@参见DefaultAopProxyFactory
 */
public interface AopProxy {

	/**
	 * Create a new proxy object.
	 * <p>Uses the AopProxy's default class loader (if necessary for proxy creation):
	 * usually, the thread context class loader.
	 * @return the new proxy object (never {@code null})
	 * @see Thread#getContextClassLoader()
	 */
	/**
	 *创建新的代理对象。
	 *＜p＞使用AopProxy的默认类加载器（如果需要创建代理）：
	 *通常是线程上下文类加载器。
	 *@返回新的代理对象（从不｛@code null｝）
	 *@参见线程#getContextClassLoader（）
	 */
	Object getProxy();

	/**
	 * Create a new proxy object.
	 * <p>Uses the given class loader (if necessary for proxy creation).
	 * {@code null} will simply be passed down and thus lead to the low-level
	 * proxy facility's default, which is usually different from the default chosen
	 * by the AopProxy implementation's {@link #getProxy()} method.
	 * @param classLoader the class loader to create the proxy with
	 * (or {@code null} for the low-level proxy facility's default)
	 * @return the new proxy object (never {@code null})
	 */
	/**
	 *创建新的代理对象。
	 *＜p＞使用给定的类加载器（如果需要创建代理）。
	 *｛@code null｝将被简单地传递，从而导致低级
	 *代理设施的默认值，通常与所选的默认值不同
	 *通过AopProxy实现的｛@link#getProxy（）｝方法。
	 *@param classLoader创建代理的类加载器
	 *（或｛@code null｝表示低级代理工具的默认值）
	 *@返回新的代理对象（从不｛@code null｝）
	 */
	Object getProxy(@Nullable ClassLoader classLoader);

	/**
	 * Determine the proxy class.
	 * @param classLoader the class loader to create the proxy class with
	 * (or {@code null} for the low-level proxy facility's default)
	 * @return the proxy class
	 * @since 6.0
	 */
	/**
	 *确定代理类。
	 *@param classLoader创建代理类的类加载器
	 *（或｛@code null｝表示低级代理工具的默认值）
	 *@return代理类
	 *@自6.0起
	 */
	Class<?> getProxyClass(@Nullable ClassLoader classLoader);

}
